package com.jvup.gameshow.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.jvup.common.constant.Navigation;
import com.jvup.common.inject.EventControllerInjector;
import com.jvup.gameshow.R;
import com.jvup.common.support.base.BaseFragment;
import com.jvup.gameshow.controller.MallController;
import com.jvup.gameshow.databinding.FragmentMallBinding;
import com.jvup.gameshow.model.viewModel.impl.MallViewModel;
import com.qire.antscore.annotation.RouteMapping;
import com.qire.antsrouter.inject.Autowired;

@RouteMapping(path = Navigation.Fragment.MallFragment)
public class MallFragment extends BaseFragment<FragmentMallBinding> {

    @Autowired
    MallViewModel viewModel;

    @Autowired(injector = EventControllerInjector.class)
    MallController controller;

    @Override
    public int layoutRid() {
        return R.layout.fragment_mall;
    }

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View rootView = super.onCreateView(inflater, container, savedInstanceState);
        FragmentMallBinding viewDataBinder = viewDataBinder();
        viewDataBinder.setMallViewModel(viewModel);
        return rootView;
    }
}
